{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import sys\n",
    "sys.path.append(\"..\")"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Imports"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "from finnlp.data_sources.news.tushare_major_news import Tushare_Major_News"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Config"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "start_date = \"2022-01-01\"\n",
    "end_date = \"2022-01-05\""
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### News_downloader"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "news_downloader = Tushare_finance()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "3c0d1c2084844174ba7d851a7e118f94",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "  0%|          | 0/5 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "ename": "Exception",
     "evalue": "抱歉，您每小时最多访问该接口4次，权限的具体详情访问：https://tushare.pro/document/1?doc_id=108。",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mException\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32m~\\AppData\\Local\\Temp\\ipykernel_133628\\3989121806.py\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mnews_downloader\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdownload_news\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mstart_date\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mend_date\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;32m~\\AppData\\Local\\Temp\\ipykernel_133628\\3702496861.py\u001b[0m in \u001b[0;36mdownload_news\u001b[1;34m(self, start_date, end_date, stock)\u001b[0m\n\u001b[0;32m     15\u001b[0m         \u001b[0mres\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mpd\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mDataFrame\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     16\u001b[0m         \u001b[1;32mfor\u001b[0m \u001b[0mdate\u001b[0m \u001b[1;32min\u001b[0m \u001b[0mtqdm\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdate_list\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 17\u001b[1;33m             \u001b[0mtmp\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mgather_one_day_news\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mdate\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m     18\u001b[0m             \u001b[0mres\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mpd\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mconcat\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mres\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mtmp\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     19\u001b[0m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdataframe\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mres\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\AppData\\Local\\Temp\\ipykernel_133628\\3702496861.py\u001b[0m in \u001b[0;36mgather_one_day_news\u001b[1;34m(self, date, stock, delay)\u001b[0m\n\u001b[0;32m     21\u001b[0m     \u001b[1;32mdef\u001b[0m \u001b[0mgather_one_day_news\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mdate\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mstock\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;34m\"all\"\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mdelay\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;36m0.1\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     22\u001b[0m         \u001b[0mdate\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mtransfer_standard_date_to_nonstandard\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mdate\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 23\u001b[1;33m         \u001b[0mres\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mpro\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mmajor_news\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mstart_date\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mdate\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mend_date\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mdate\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m     24\u001b[0m         \u001b[0mtime\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msleep\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mdelay\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     25\u001b[0m         \u001b[1;32mreturn\u001b[0m \u001b[0mres\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mc:\\Users\\Olive\\.conda\\envs\\finrl\\lib\\site-packages\\tushare\\pro\\client.py\u001b[0m in \u001b[0;36mquery\u001b[1;34m(self, api_name, fields, **kwargs)\u001b[0m\n\u001b[0;32m     42\u001b[0m             \u001b[0mresult\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mjson\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mloads\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mres\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mtext\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     43\u001b[0m             \u001b[1;32mif\u001b[0m \u001b[0mresult\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m'code'\u001b[0m\u001b[1;33m]\u001b[0m \u001b[1;33m!=\u001b[0m \u001b[1;36m0\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 44\u001b[1;33m                 \u001b[1;32mraise\u001b[0m \u001b[0mException\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mresult\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m'msg'\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m     45\u001b[0m             \u001b[0mdata\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mresult\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m'data'\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     46\u001b[0m             \u001b[0mcolumns\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mdata\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m'fields'\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;31mException\u001b[0m: 抱歉，您每小时最多访问该接口4次，权限的具体详情访问：https://tushare.pro/document/1?doc_id=108。"
     ]
    }
   ],
   "source": [
    "news_downloader.download_news(start_date,end_date)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(60, 3)"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "news_downloader.dataframe.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>title</th>\n",
       "      <th>pub_time</th>\n",
       "      <th>src</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>市政协委员、奇安信集团董事长齐向东：建议北京市推进“第三方数据监管平台”和“跨行业反诈大数据...</td>\n",
       "      <td>2022-01-04 23:59:24</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>新增30家！海珠公布第二批校外培训机构预收费资金监管账户，家长要留心</td>\n",
       "      <td>2022-01-04 23:45:12</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>市政协委员、北京市石景山区督查督办科科长杨朝霞：尽快对全市6100余个“骑沿井”进行改造</td>\n",
       "      <td>2022-01-04 23:43:55</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>延庆区教委：区内冰雪技能普及人数累计达到3.1万余人</td>\n",
       "      <td>2022-01-04 23:35:26</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>RCEP生效 为全球经济注入新动能</td>\n",
       "      <td>2022-01-04 23:33:46</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>关于召开“2021年度江苏省钢铁行业十大新闻”、“2021年度钢铁工业十大技术成果”等专家评...</td>\n",
       "      <td>2022-01-04 23:32:18</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>3450万元卖参股公司0.23%股权 2名独董投弃权票 诚迈科技收关注函</td>\n",
       "      <td>2022-01-04 23:25:38</td>\n",
       "      <td>新浪财经</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>天津《企业开办登记规范》地方标准发布 助企业开办1个工作日办结</td>\n",
       "      <td>2022-01-04 23:22:40</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>我国将实施企业信用风险分类管理</td>\n",
       "      <td>2022-01-04 23:22:27</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>德国去年12月失业率降至5.2%</td>\n",
       "      <td>2022-01-04 23:21:18</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>元旦假期南京共出行约1197.89万人次</td>\n",
       "      <td>2022-01-04 23:16:38</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>统计上严重失信企业信息公示：柳州市金百汇激光技术有限责任公司</td>\n",
       "      <td>2022-01-04 23:10:35</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>关于对浙江天铁实业股份有限公司及相关人员采取出具警示函措施的决定</td>\n",
       "      <td>2022-01-04 23:10:26</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>就在明天，2022年首只银行股将申购</td>\n",
       "      <td>2022-01-04 23:08:43</td>\n",
       "      <td>新浪财经</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>近15亿元资产1元钱就卖？交易所问询，公司回应来了</td>\n",
       "      <td>2022-01-04 23:08:25</td>\n",
       "      <td>新浪财经</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>冲击高端市场迈出第一步 realme发布真我GT2 Pro旗舰手机</td>\n",
       "      <td>2022-01-04 23:07:37</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>倒计时一个月！北京冬奥会开幕临近，概念股提前起飞，这些上市公司积极备战</td>\n",
       "      <td>2022-01-04 23:07:36</td>\n",
       "      <td>新浪财经</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>倒计时一个月！北京冬奥会开幕临近，概念股提前起飞，这些上市公司积极备战</td>\n",
       "      <td>2022-01-04 23:05:47</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>企业实施碳中和战略要把握五个关键点</td>\n",
       "      <td>2022-01-04 23:05:06</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>气候投融资试点工作方案发布地方 政府可从五大方面推进</td>\n",
       "      <td>2022-01-04 23:04:49</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>网信办等4部门规范管理算法推荐 未来算法产业方向明朗</td>\n",
       "      <td>2022-01-04 23:04:04</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>绿色投资不是情怀 券商ESG行动需不断突破</td>\n",
       "      <td>2022-01-04 23:03:31</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>中药掀涨停潮CXO遭遇重挫 系资金切换过激所致</td>\n",
       "      <td>2022-01-04 23:03:20</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>TCL发布第一款笔记本电脑，售价349美元主打轻便与性价比</td>\n",
       "      <td>2022-01-04 23:01:53</td>\n",
       "      <td>新浪财经</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>美股三大股指涨跌不一 热门中概股持续走低掌门教育盘中跌超21%</td>\n",
       "      <td>2022-01-04 23:00:31</td>\n",
       "      <td>凤凰财经</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>2.16亿股！中国泛海转让民生银行股权，所持泛海控股超1亿股也将被拍卖</td>\n",
       "      <td>2022-01-04 22:56:55</td>\n",
       "      <td>新浪财经</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>柳州市举办先进激光技术应用论坛</td>\n",
       "      <td>2022-01-04 22:56:09</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>喜讯！建设集团中标贵州省城乡和住房建设厅两个磷石膏研发科技项目</td>\n",
       "      <td>2022-01-04 22:55:32</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>盘点2021家电行业：回购股票激励员工、多元化布局追“风口”</td>\n",
       "      <td>2022-01-04 22:52:40</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>泰康系减持阳光城股份亏损超16亿元 接盘方实力存疑</td>\n",
       "      <td>2022-01-04 22:52:32</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>各地政策密集落地，A股氢燃料汽车板块未来的潜力点在哪？</td>\n",
       "      <td>2022-01-04 22:52:24</td>\n",
       "      <td>新浪财经</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>【2022年行业展望】汽车金融公司：资本充足，盈利性强，资产质量好，信用展望稳定</td>\n",
       "      <td>2022-01-04 22:52:10</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32</th>\n",
       "      <td>公安部新修制订3部部门规章</td>\n",
       "      <td>2022-01-04 22:51:56</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>33</th>\n",
       "      <td>市政协委员欧云崧：尽快推广实施共享单车自主划定禁停区</td>\n",
       "      <td>2022-01-04 22:51:01</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>34</th>\n",
       "      <td>仁桥资产夏俊杰：2022年最佳风险收益比的机会在港股</td>\n",
       "      <td>2022-01-04 22:47:55</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>35</th>\n",
       "      <td>进化论资产王一平：2022年从四个方向挖掘投资机会</td>\n",
       "      <td>2022-01-04 22:47:50</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>36</th>\n",
       "      <td>元旦档总票房超10亿收官，12部电影将激战春节档</td>\n",
       "      <td>2022-01-04 22:45:16</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37</th>\n",
       "      <td>美国酒商激战进行时</td>\n",
       "      <td>2022-01-04 22:44:47</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38</th>\n",
       "      <td>中集分拆化工装备板块上市 中集安瑞环科闯关创业板</td>\n",
       "      <td>2022-01-04 22:43:46</td>\n",
       "      <td>新浪财经</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>39</th>\n",
       "      <td>新年首个交易日“宁王”跌3.25%，新能源行情是否结束了</td>\n",
       "      <td>2022-01-04 22:39:43</td>\n",
       "      <td>新浪财经</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>40</th>\n",
       "      <td>把怀柔科学城打造成“梦之城”，政协委员谈“科技创新中心建设”</td>\n",
       "      <td>2022-01-04 22:36:21</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>41</th>\n",
       "      <td>银联网络元旦消费金额创新高</td>\n",
       "      <td>2022-01-04 22:34:47</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>42</th>\n",
       "      <td>美国5年期国债收益率创2020年2月来最高 市场愈发坚定美联储加息预期</td>\n",
       "      <td>2022-01-04 22:34:14</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>43</th>\n",
       "      <td>2022年北交所打新第一股来了！募资约1.54亿元，吸引9家战投认购</td>\n",
       "      <td>2022-01-04 22:33:20</td>\n",
       "      <td>新浪财经</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>44</th>\n",
       "      <td>北交所首单重大资产重组出炉！中航泰达拟4.68亿元参与北方稀土子公司混改，明日起复牌</td>\n",
       "      <td>2022-01-04 22:33:00</td>\n",
       "      <td>新浪财经</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>45</th>\n",
       "      <td>车企争秀2021年新能源“成绩单”！特斯拉全球交付量超93万辆，“蔚小理”年销已逼近10万辆关口</td>\n",
       "      <td>2022-01-04 22:31:26</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>46</th>\n",
       "      <td>再次押注海外休闲游戏，字节跳动是如何布局游戏行业投资的</td>\n",
       "      <td>2022-01-04 22:30:50</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>47</th>\n",
       "      <td>中长期利率趋稳</td>\n",
       "      <td>2022-01-04 22:28:57</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>48</th>\n",
       "      <td>滴血验癌公司创始人被定罪，指控其犯有电信欺诈罪</td>\n",
       "      <td>2022-01-04 22:28:03</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49</th>\n",
       "      <td>HMVOD视频拟购入泰国节目</td>\n",
       "      <td>2022-01-04 22:27:07</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50</th>\n",
       "      <td>国务院批准：在海南这个地方开展高水平开放试点</td>\n",
       "      <td>2022-01-04 22:23:36</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>51</th>\n",
       "      <td>5日零时起，东莞市全域均为低风险地区</td>\n",
       "      <td>2022-01-04 22:22:27</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>52</th>\n",
       "      <td>缺芯”压力仍存，大众在华转型进入“阵痛期</td>\n",
       "      <td>2022-01-04 22:22:19</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>53</th>\n",
       "      <td>全国首例！苏州立案查处一起全国碳市场碳排放配额未按期履约案件</td>\n",
       "      <td>2022-01-04 22:22:00</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>54</th>\n",
       "      <td>分析人士：印尼禁止煤炭出口对我国影响有限</td>\n",
       "      <td>2022-01-04 22:21:27</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>55</th>\n",
       "      <td>如祺出行获战略投资，车企布局出行市场为哪般</td>\n",
       "      <td>2022-01-04 22:21:26</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>56</th>\n",
       "      <td>美国过去一周激增新冠确诊病例336万 美媒：数据“仍然被低估了”</td>\n",
       "      <td>2022-01-04 22:20:38</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>57</th>\n",
       "      <td>国家发展改革委特别安排海南专项100亿元</td>\n",
       "      <td>2022-01-04 22:17:51</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>58</th>\n",
       "      <td>牧原、双汇牵手：多方看好的“联姻”为何迟到10年</td>\n",
       "      <td>2022-01-04 22:17:32</td>\n",
       "      <td>新浪财经</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>59</th>\n",
       "      <td>发起“全民热身月” 赖茅跨界体育深耕消费市场</td>\n",
       "      <td>2022-01-04 22:15:47</td>\n",
       "      <td>同花顺</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                title             pub_time  \\\n",
       "0   市政协委员、奇安信集团董事长齐向东：建议北京市推进“第三方数据监管平台”和“跨行业反诈大数据...  2022-01-04 23:59:24   \n",
       "1                  新增30家！海珠公布第二批校外培训机构预收费资金监管账户，家长要留心  2022-01-04 23:45:12   \n",
       "2        市政协委员、北京市石景山区督查督办科科长杨朝霞：尽快对全市6100余个“骑沿井”进行改造  2022-01-04 23:43:55   \n",
       "3                          延庆区教委：区内冰雪技能普及人数累计达到3.1万余人  2022-01-04 23:35:26   \n",
       "4                                   RCEP生效 为全球经济注入新动能  2022-01-04 23:33:46   \n",
       "5   关于召开“2021年度江苏省钢铁行业十大新闻”、“2021年度钢铁工业十大技术成果”等专家评...  2022-01-04 23:32:18   \n",
       "6                3450万元卖参股公司0.23%股权 2名独董投弃权票 诚迈科技收关注函  2022-01-04 23:25:38   \n",
       "7                     天津《企业开办登记规范》地方标准发布 助企业开办1个工作日办结  2022-01-04 23:22:40   \n",
       "8                                     我国将实施企业信用风险分类管理  2022-01-04 23:22:27   \n",
       "9                                    德国去年12月失业率降至5.2%  2022-01-04 23:21:18   \n",
       "10                               元旦假期南京共出行约1197.89万人次  2022-01-04 23:16:38   \n",
       "11                     统计上严重失信企业信息公示：柳州市金百汇激光技术有限责任公司  2022-01-04 23:10:35   \n",
       "12                   关于对浙江天铁实业股份有限公司及相关人员采取出具警示函措施的决定  2022-01-04 23:10:26   \n",
       "13                                 就在明天，2022年首只银行股将申购  2022-01-04 23:08:43   \n",
       "14                          近15亿元资产1元钱就卖？交易所问询，公司回应来了  2022-01-04 23:08:25   \n",
       "15                  冲击高端市场迈出第一步 realme发布真我GT2 Pro旗舰手机  2022-01-04 23:07:37   \n",
       "16                倒计时一个月！北京冬奥会开幕临近，概念股提前起飞，这些上市公司积极备战  2022-01-04 23:07:36   \n",
       "17                倒计时一个月！北京冬奥会开幕临近，概念股提前起飞，这些上市公司积极备战  2022-01-04 23:05:47   \n",
       "18                                  企业实施碳中和战略要把握五个关键点  2022-01-04 23:05:06   \n",
       "19                         气候投融资试点工作方案发布地方 政府可从五大方面推进  2022-01-04 23:04:49   \n",
       "20                         网信办等4部门规范管理算法推荐 未来算法产业方向明朗  2022-01-04 23:04:04   \n",
       "21                              绿色投资不是情怀 券商ESG行动需不断突破  2022-01-04 23:03:31   \n",
       "22                            中药掀涨停潮CXO遭遇重挫 系资金切换过激所致  2022-01-04 23:03:20   \n",
       "23                      TCL发布第一款笔记本电脑，售价349美元主打轻便与性价比  2022-01-04 23:01:53   \n",
       "24                    美股三大股指涨跌不一 热门中概股持续走低掌门教育盘中跌超21%  2022-01-04 23:00:31   \n",
       "25                2.16亿股！中国泛海转让民生银行股权，所持泛海控股超1亿股也将被拍卖  2022-01-04 22:56:55   \n",
       "26                                    柳州市举办先进激光技术应用论坛  2022-01-04 22:56:09   \n",
       "27                    喜讯！建设集团中标贵州省城乡和住房建设厅两个磷石膏研发科技项目  2022-01-04 22:55:32   \n",
       "28                     盘点2021家电行业：回购股票激励员工、多元化布局追“风口”  2022-01-04 22:52:40   \n",
       "29                          泰康系减持阳光城股份亏损超16亿元 接盘方实力存疑  2022-01-04 22:52:32   \n",
       "30                        各地政策密集落地，A股氢燃料汽车板块未来的潜力点在哪？  2022-01-04 22:52:24   \n",
       "31           【2022年行业展望】汽车金融公司：资本充足，盈利性强，资产质量好，信用展望稳定  2022-01-04 22:52:10   \n",
       "32                                      公安部新修制订3部部门规章  2022-01-04 22:51:56   \n",
       "33                         市政协委员欧云崧：尽快推广实施共享单车自主划定禁停区  2022-01-04 22:51:01   \n",
       "34                         仁桥资产夏俊杰：2022年最佳风险收益比的机会在港股  2022-01-04 22:47:55   \n",
       "35                          进化论资产王一平：2022年从四个方向挖掘投资机会  2022-01-04 22:47:50   \n",
       "36                           元旦档总票房超10亿收官，12部电影将激战春节档  2022-01-04 22:45:16   \n",
       "37                                          美国酒商激战进行时  2022-01-04 22:44:47   \n",
       "38                           中集分拆化工装备板块上市 中集安瑞环科闯关创业板  2022-01-04 22:43:46   \n",
       "39                       新年首个交易日“宁王”跌3.25%，新能源行情是否结束了  2022-01-04 22:39:43   \n",
       "40                     把怀柔科学城打造成“梦之城”，政协委员谈“科技创新中心建设”  2022-01-04 22:36:21   \n",
       "41                                      银联网络元旦消费金额创新高  2022-01-04 22:34:47   \n",
       "42                美国5年期国债收益率创2020年2月来最高 市场愈发坚定美联储加息预期  2022-01-04 22:34:14   \n",
       "43                 2022年北交所打新第一股来了！募资约1.54亿元，吸引9家战投认购  2022-01-04 22:33:20   \n",
       "44         北交所首单重大资产重组出炉！中航泰达拟4.68亿元参与北方稀土子公司混改，明日起复牌  2022-01-04 22:33:00   \n",
       "45   车企争秀2021年新能源“成绩单”！特斯拉全球交付量超93万辆，“蔚小理”年销已逼近10万辆关口  2022-01-04 22:31:26   \n",
       "46                        再次押注海外休闲游戏，字节跳动是如何布局游戏行业投资的  2022-01-04 22:30:50   \n",
       "47                                            中长期利率趋稳  2022-01-04 22:28:57   \n",
       "48                            滴血验癌公司创始人被定罪，指控其犯有电信欺诈罪  2022-01-04 22:28:03   \n",
       "49                                     HMVOD视频拟购入泰国节目  2022-01-04 22:27:07   \n",
       "50                             国务院批准：在海南这个地方开展高水平开放试点  2022-01-04 22:23:36   \n",
       "51                                 5日零时起，东莞市全域均为低风险地区  2022-01-04 22:22:27   \n",
       "52                               缺芯”压力仍存，大众在华转型进入“阵痛期  2022-01-04 22:22:19   \n",
       "53                     全国首例！苏州立案查处一起全国碳市场碳排放配额未按期履约案件  2022-01-04 22:22:00   \n",
       "54                               分析人士：印尼禁止煤炭出口对我国影响有限  2022-01-04 22:21:27   \n",
       "55                              如祺出行获战略投资，车企布局出行市场为哪般  2022-01-04 22:21:26   \n",
       "56                   美国过去一周激增新冠确诊病例336万 美媒：数据“仍然被低估了”  2022-01-04 22:20:38   \n",
       "57                               国家发展改革委特别安排海南专项100亿元  2022-01-04 22:17:51   \n",
       "58                           牧原、双汇牵手：多方看好的“联姻”为何迟到10年  2022-01-04 22:17:32   \n",
       "59                             发起“全民热身月” 赖茅跨界体育深耕消费市场  2022-01-04 22:15:47   \n",
       "\n",
       "     src  \n",
       "0    同花顺  \n",
       "1    同花顺  \n",
       "2    同花顺  \n",
       "3    同花顺  \n",
       "4    同花顺  \n",
       "5    同花顺  \n",
       "6   新浪财经  \n",
       "7    同花顺  \n",
       "8    同花顺  \n",
       "9    同花顺  \n",
       "10   同花顺  \n",
       "11   同花顺  \n",
       "12   同花顺  \n",
       "13  新浪财经  \n",
       "14  新浪财经  \n",
       "15   同花顺  \n",
       "16  新浪财经  \n",
       "17   同花顺  \n",
       "18   同花顺  \n",
       "19   同花顺  \n",
       "20   同花顺  \n",
       "21   同花顺  \n",
       "22   同花顺  \n",
       "23  新浪财经  \n",
       "24  凤凰财经  \n",
       "25  新浪财经  \n",
       "26   同花顺  \n",
       "27   同花顺  \n",
       "28   同花顺  \n",
       "29   同花顺  \n",
       "30  新浪财经  \n",
       "31   同花顺  \n",
       "32   同花顺  \n",
       "33   同花顺  \n",
       "34   同花顺  \n",
       "35   同花顺  \n",
       "36   同花顺  \n",
       "37   同花顺  \n",
       "38  新浪财经  \n",
       "39  新浪财经  \n",
       "40   同花顺  \n",
       "41   同花顺  \n",
       "42   同花顺  \n",
       "43  新浪财经  \n",
       "44  新浪财经  \n",
       "45   同花顺  \n",
       "46   同花顺  \n",
       "47   同花顺  \n",
       "48   同花顺  \n",
       "49   同花顺  \n",
       "50   同花顺  \n",
       "51   同花顺  \n",
       "52   同花顺  \n",
       "53   同花顺  \n",
       "54   同花顺  \n",
       "55   同花顺  \n",
       "56   同花顺  \n",
       "57   同花顺  \n",
       "58  新浪财经  \n",
       "59   同花顺  "
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "news_downloader.dataframe"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "finrl",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.12"
  },
  "orig_nbformat": 4,
  "vscode": {
   "interpreter": {
    "hash": "afd6dc03c9be451573fc2885de79a969af6a24a159f11a3ead741ab7a9ff405f"
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
